package fm.douban.service.impl;

import fm.douban.model.Song;
import fm.douban.service.SongService;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author CoderXshuai
 */
@Service
public class SongServiceImpl implements SongService {
    private static Map<String, Song> songMap = new HashMap<>();

    static {
        Song song = new Song();
        song.setId("001");
        song.setSubjectId("s001");
        song.setLyrics("...");
        song.setName("成都");
        songMap.put(song.getId(), song);
    }

    @Override
    public Song get(String songId) {
        return songMap.get(songId);
    }
}
